From: Juri Linkov Date: Thu, 19 Nov 2009 17:39:54 +0000 (+0000) Subject: (switch-to-completions): Move point to the first X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~9377 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ae14387b1fed1e916aee73a613abc15c43b63e49;p=emacs.git (switch-to-completions): Move point to the first completion when point was at the beginning of the buffer. --- diff --git a/lisp/simple.el b/lisp/simple.el index 87e65eebce8..23811ad80fc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6032,14 +6032,15 @@ select the completion near point.\n\n")))))) "Select the completion list window." (interactive) (let ((window (or (get-buffer-window "*Completions*" 0) - ;; Make sure we have a completions window. + ;; Make sure we have a completions window. (progn (minibuffer-completion-help) (get-buffer-window "*Completions*" 0))))) (when window (select-window window) - (goto-char (point-min)) - (search-forward "\n\n" nil t) - (forward-line 1)))) + ;; In the new buffer, go to the first completion. + ;; FIXME: Perhaps this should be done in `minibuffer-completion-help'. + (when (bobp) + (next-completion 1))))) ;;; Support keyboard commands to turn on various modifiers.